package torcs.danielpd.SANE;

import java.util.Random;

public class Neuron {
	public static Random r = new Random(42);
	
	public int[] connections;
	public double[] weights;
	
	Neuron (int nConnections) {
		connections = new int[nConnections];
		weights = new double[nConnections];
	}
	
	public void initialize() {
		System.out.print(this.toString() +":  ");
		for (int c = 0; c < connections.length; c++) {
			connections[c] = r.nextInt(MyEA.inputLayerSize + MyEA.outputLayerSize) - MyEA.inputLayerSize;
			System.out.print(connections[c]+" ");
			weights[c] = r.nextDouble()*2 - 1;
		}
		System.out.println();
	}
}
